package com.yookey.common.constant;

import lombok.Getter;

/**
 * @author wangjian
 * @date 2019年12月18日 10:02:48
 */
@Getter
public enum ResponseMessage {

    /**
     * 服务不可达
     */
    SERVICE_UNAVAILABLE(99, "服务不可达"),

    /**
     * 请求成功
     */
    SUCCESS(100, "请求成功"),


    /**
     * token过期
     */
    TOKEN_EXPIRED(102, "token已过期，请重新登录"),

    /**
     * token验证错误
     */
    TOKEN_ERROR(103, "token error"),

    PARAMNOTEXIST(104, "参数不存在"),

    PARAMERROR(105, "参数错误/必传参数为空"),

    NOPERMISSION(106, "无权限"),

    QRCODEEXPIRED(107, "二维码过期"),

    VERIFYCODEERROR(108, "验证码错误"),

    VERIFYCODENOTEXIST(109, "验证码过期或不存在"),

    NODATALIST(110, "暂无数据"),

    NODATA(115, "数据不存在或已删除"),

    INSERTFAIL(111, "数据保存失败"),

    UPDATEFAIL(112, "数据更新失败"),

    DELETEFAIL(113, "数据删除失败"),

    FAIL(114, "操作失败"),

    FEIGN_FALL(115, "feign调用失败"),

    FILE_UPLOAD_FAIL(116, "文件保存失败"),

    VERIFY_CODE_SEND_SUCCESS(117, "验证码发送成功"),

    VERIFY_CODE_SEND_FAIL(118, "验证码发送失败"),

    PAGING_PARAM_ERROR(119, "分页参数错误"),

    DATA_SAVE_SUCCESS(120, "数据保存成功"),

    FILE_UPLOAD_SUCCESS(121, "文件上传成功"),

    FAIL_DATA_TRANSFER(122, "获取数据转换失败"),

    SAVE_SUCCESS(123, "数据保存成功"),

    ACCOUNT_FORBIDDEN(124, "账户已禁用");


    private int code;
    private String msg;

    ResponseMessage(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
